package com.bw.controller;

import com.bw.bean.Mov;
import com.bw.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @Autowired
    UserService userService;

    @RequestMapping("/list")
    private List<Mov> t1(){
        List<Mov> list=userService.get1();
        return list;
    }

    @RequestMapping("/list2")
    private List<Mov> t2(){
        List<Mov> list=userService.get2();
        return list;
    }

    @RequestMapping("/list3")
    private List<Mov> t3(){
        String mname1="红";
        List<Mov> list=userService.get3(mname1);
        return list;
    }

    @RequestMapping("/list4")
    private List<Mov> t4(){
        String name1="大鹏";
        List<Mov> list=userService.get4(name1);
        return list;
    }

    @RequestMapping("/list5")
    private List<Mov> t5(){
        String date1="2015-01-01";
        String date2="2020-01-01";
        List<Mov> list=userService.get5(date1,date2);
        return list;
    }
}
